//index focus images
;(function($) {
    $.fn.imgFocus = function(options) {
        var settings = {
            affect: 'scrollx', //效果  有scrollx|scrolly|fade|none
            speed: 500, //动画速度
            space: 5000, //时间间隔
            auto: true, //自动滚动
            trigger: 'mouseover', //触发事件 注意用mouseover代替hover
            conbox: '.slidesCon', //内容容器id或class
            ctag: 'a', //内容标签 默认为<a>
            switcher: '.slideNav', //切换触发器id或class
            stag: 'span', //切换器标签 默认为a
            current:'selected', //当前切换器样式名称
            rand: false //是否随机指定默认幻灯图片
        };
        settings = $.extend({}, settings, options);
        var index = 1;
        var last_index = 0;
        var $conbox = $(this).find(settings.conbox),
            $contents = $conbox.find(settings.ctag);
        var $switcher = $(this).find(settings.switcher),
            $stag = $switcher.find(settings.stag);
        if (settings.rand) {
            index = Math.floor(Math.random() * $contents.length);
            slide();
        }
        if (settings.affect == 'fade') {
            $.each($contents, function(k, v) {
                (k === 0) ? $(this).css({
                    'position': 'absolute',
                    'z-index': 9
                }) : $(this).css({
                    'position': 'absolute',
                    'z-index': 1,
                    'opacity': 0
                });
            });
        }

        function slide() {
            if (index >= $contents.length) index = 0;
            $stag.removeClass(settings.current).eq(index).addClass(settings.current);
            switch (settings.affect) {
                case 'scrollx':
                    $conbox.width($contents.length * $contents.width());
                    $conbox.stop().animate({
                        left: -$contents.width() * index
                    }, settings.speed);
                    break;
                case 'scrolly':
                    $contents.css({
                        display: 'block'
                    });
                    $conbox.stop().animate({
                        top: -$contents.height() * index + 'px'
                    }, settings.speed);
                    break;
                case 'fade':
                    $contents.eq(last_index).stop().animate({
                        'opacity': 0
                    }, settings.speed / 2).css('z-index', 1)
                        .end()
                        .eq(index).css('z-index', 9).stop().animate({
                            'opacity': 1
                        }, settings.speed / 2)
                    break;
                case 'none':
                    $contents.hide().eq(index).show();
                    break;
            }
            last_index = index;
            index++;
        };
        if (settings.auto) var Timer = setInterval(slide, settings.space);
        $stag.bind(settings.trigger, function() {
            _pause()
            index = $(this).index();
            slide();
            _continue()
        });
        $conbox.hover(_pause, _continue);

        function _pause() {
            clearInterval(Timer);
        }

        function _continue() {
            if (settings.auto) Timer = setInterval(slide, settings.space);
        }
    }
})(jQuery);

//index slider images
;(function($) {
    $.fn.jCarouselLite = function(o) {
        o = $.extend({
            btnPrev: null,   //前一个按钮,自定义按钮名字
            btnNext: null,    //前一个按钮,自定义按钮名字
            btnGo: null,      
            mouseWheel: false,
            auto: null,
            speed: 200,   //动画速度
            easing: null,
            vertical: false,
            circular: true,
            visible: 3,    //每一行显示几张图片
            start: 0,     // 从第几张图开始显示，默认0，从第一张，1:第二张.... 
            scroll: 1,     //每次触发事件或自动播放移动几张图片
            overShow: false,
            beforeStart: null,
            afterEnd: null
        }, o || {});

        return this.each(function() { // Returns the element collection. Chainable.

            var running = false,
                f = true,
                animCss = o.vertical ? "top" : "left",
                sizeCss = o.vertical ? "height" : "width";
            var div = $(this),
                ul = $("ul", div),
                tLi = $("li", ul),
                tl = tLi.size(),
                v = o.visible;

            if (tLi.length == 0){
                return;
            }
            if (o.circular) {
                ul.prepend(tLi.slice(tl - v).clone())
                    .append(tLi.slice(0, v).clone());
                o.start += v;
            }

            var li = $("li", ul),
                itemLength = li.size(),
                curr = o.start;
            div.css("visibility", "visible");

            // if (o.overShow) {
            //     var mouseOverDelay = null;
            //     div.hover(
            //         function () {
            //             f = false;
            //             if (mouseOverDelay) {
            //                 window.clearTimeout(mouseOverDelay);
            //             }
            //             $(o.btnPrev + ',' + o.btnNext).show();
            //         },
            //         function () {
            //             f = true;
            //             mouseOverDelay = window.setTimeout(function() {
            //                 $(o.btnPrev + ',' + o.btnNext).hide();
            //             }, 300);

            //         }
            //     );
            //     $(o.btnNext + ',' + o.btnPrev).mouseover(function() {
            //         if (mouseOverDelay) {
            //             window.clearTimeout(mouseOverDelay);
            //         }
            //     });
            // }

            // 控制左右按钮是否移开就隐藏

            li.css({
                overflow: "hidden",
                float: o.vertical ? "none" : "left"
            });
            ul.css({
                margin: "0",
                padding: "0",
                position: "relative",
                "list-style-type": "none",
                "z-index": "1"
            });
            div.css({
                overflow: "hidden",
                position: "relative",
                "z-index": "2",
                left: "0px"
            });

            var liSize = o.vertical ? height(li) : width(li); // Full li size(incl margin)-Used for animation
            var ulSize = liSize * itemLength; // size of full ul(total length, not just for the visible items)
            var divSize = liSize * v; // size of entire div(total length for just the visible items)

            li.css({
                width: li.width(),
                height: li.height()
            });
            ul.css(sizeCss, ulSize + "px").css(animCss, -(curr * liSize));

            div.css(sizeCss, divSize + "px"); // Width of the DIV. length of visible images

            if (o.btnPrev)
                $(o.btnPrev).click(function() {
                    return go(curr - o.scroll);
                });

            if (o.btnNext)
                $(o.btnNext).click(function() {
                    return go(curr + o.scroll);
                });

            if (o.btnGo)
                $.each(o.btnGo, function(i, val) {
                    $(val).click(function() {
                        return go(o.circular ? o.visible + i : i);
                    });
                });

            if (o.mouseWheel && div.mousewheel)
                div.mousewheel(function(e, d) {
                    return d > 0 ? go(curr - o.scroll) : go(curr + o.scroll);
                });

            if (o.auto)
                setInterval(function() {
                    go(curr + o.scroll);
                }, o.auto + o.speed);

            function vis() {
                return li.slice(curr).slice(0, v);
            };

            function go(to) {
                if (!running && f) {

                    if (o.beforeStart)
                        o.beforeStart.call(this, vis());

                    if (o.circular) { // If circular we are in first or last, then goto the other end
                        if (to <= o.start - v - 1) { // If first, then goto last
                            ul.css(animCss, -((itemLength - (v * 2)) * liSize) + "px");
                            // If "scroll" > 1, then the "to" might not be equal to the condition; it can be lesser depending on the number of elements.
                            curr = to == o.start - v - 1 ? itemLength - (v * 2) - 1 : itemLength - (v * 2) - o.scroll;
                        } else if (to >= itemLength - v + 1) { // If last, then goto first
                            ul.css(animCss, -((v) * liSize) + "px");
                            // If "scroll" > 1, then the "to" might not be equal to the condition; it can be greater depending on the number of elements.
                            curr = to == itemLength - v + 1 ? v + 1 : v + o.scroll;

                        } else curr = to;
                    } else { // If non-circular and to points to first or last, we just return.
                        if (to < 0 || to > itemLength - v) return;
                        else curr = to;
                    } // If neither overrides it, the curr will still be "to" and we can proceed.

                    running = true;

                    ul.animate(
                        animCss == "left" ? {
                            left: -(curr * liSize)
                        } : {
                            top: -(curr * liSize)
                        }, o.speed, o.easing,
                        function() {
                            if (o.afterEnd)
                                o.afterEnd.call(this, vis());
                            running = false;
                        }
                    );
                    // Disable buttons when the carousel reaches the last/first, and enable when not
                    if (!o.circular) {
                        $(o.btnPrev + "," + o.btnNext).removeClass("disabled");
                        $((curr - o.scroll < 0 && o.btnPrev) ||
                            (curr + o.scroll > itemLength - v && o.btnNext) ||
                            []
                        ).addClass("disabled");
                    }

                }
                return false;
            };
        });
    };

    function css(el, prop) {
        return parseInt($.css(el[0], prop)) || 0;
    };

    function width(el) {
        return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight');
    };

    function height(el) {
        return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom');
    };

})(jQuery);


(function($) {
    $.extend($.easing, {
        easeInSine: function(x, t, b, c, d) {
            return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
        }
    });

    $.fn.Xslider = function(settings) {
        settings = $.extend({}, $.fn.Xslider.sn.defaults, settings);
        this.each(function() {
            var scrollobj = settings.scrollobj ? $(this).find(settings.scrollobj) : $(this).find("ul"),
                viewedSize = settings.viewedSize || (settings.dir == "H" ? scrollobj.parent().width() : scrollobj.parent().height()), //length of the wrapper visible;
                scrollunits = scrollobj.find("li"), //units to move;
                unitlen = settings.unitlen || (settings.dir == "H" ? scrollunits.eq(0).outerWidth() : scrollunits.eq(0).outerHeight()),
                unitdisplayed = settings.unitdisplayed, //units num displayed;
                numtoMove = settings.numtoMove > unitdisplayed ? unitdisplayed : settings.numtoMove,
                scrollobjSize = settings.scrollobjSize || scrollunits.length * unitlen, //length of the scrollobj;
                offset = 0, //max width to move;
                offsetnow = 0, //scrollobj now offset;
                movelength = unitlen * numtoMove,
                pos = settings.dir == "H" ? "left" : "top",
                moving = false, //moving now?;
                btnright = $(this).find(".aright"),
                btnleft = $(this).find(".aleft");

            btnright.unbind("click");
            btnleft.unbind("click");

            settings.dir == "H" ? scrollobj.css({
                "left": "0",
                "position": "absolute",
                "width": "9999em"
            }) : scrollobj.css({
                "top": "0",
                "position": "absolute",
                "height": "9999em"
            });

            if (scrollobjSize > viewedSize) {
                if (settings.loop == "cycle") {
                    btnleft.removeClass("agrayleft");
                    if (scrollunits.length < 2 * numtoMove + unitdisplayed - numtoMove) {
                        scrollobj.find("li").clone().appendTo(scrollobj);
                    }
                } else {
                    btnleft.addClass("agrayleft");
                    offset = scrollobjSize - viewedSize;
                }
                btnright.removeClass("agrayright");
            } else {
                btnleft.addClass("agrayleft");
                btnright.addClass("agrayright");
            }

            if (settings.overShow) {
                $(this).hover(
                    function() {
                        $(this).find(".hide").stop().fadeIn();
                        $(this).find(".aleft,.aright").show();
                    },
                    function() {
                        $(this).find(".hide").stop().fadeOut();
                        $(this).find(".aleft,.aright").hide();
                    }
                );
            }

            btnleft.click(function() {
                if ($(this).is("[class*='agrayleft']")) {
                    return false;
                }

                if (!moving) {
                    moving = true;

                    if (settings.loop == "cycle") {
                        scrollobj.find("li:gt(" + (scrollunits.length - numtoMove - 1) + ")").prependTo(scrollobj);
                        scrollobj.css(pos, "-" + movelength + "px");
                        $.fn.Xslider.sn.animate(scrollobj, 0, settings.dir, settings.speed, function() {
                            moving = false;
                        });
                    } else {
                        offsetnow -= movelength;
                        if (offsetnow > unitlen * unitdisplayed - viewedSize) {
                            $.fn.Xslider.sn.animate(scrollobj, -offsetnow, settings.dir, settings.speed, function() {
                                moving = false;
                            });
                        } else {
                            $.fn.Xslider.sn.animate(scrollobj, 0, settings.dir, settings.speed, function() {
                                moving = false;
                            });
                            offsetnow = 0;
                            $(this).addClass("agrayleft");
                        }
                        btnright.removeClass("agrayright");
                    }
                }

                return false;
            });
            btnright.click(function() {
                if ($(this).is("[class*='agrayright']")) {
                    return false;
                }
                if (!moving) {
                    moving = true;

                    if (settings.loop == "cycle") {
                        var callback = function() {
                            scrollobj.find("li:lt(" + numtoMove + ")").appendTo(scrollobj);
                            scrollobj.css(pos, "0px");
                            moving = false;
                        }
                        $.fn.Xslider.sn.animate(scrollobj, -movelength, settings.dir, settings.speed, callback);
                    } else {
                        offsetnow += movelength;
                        if (offsetnow < offset - (unitlen * unitdisplayed - viewedSize)) {
                            $.fn.Xslider.sn.animate(scrollobj, -offsetnow, settings.dir, settings.speed, function() {
                                moving = false;
                            });
                        } else {
                            $.fn.Xslider.sn.animate(scrollobj, -offset, settings.dir, settings.speed, function() {
                                moving = false;
                            }); //滚动到最后一个位置;
                            offsetnow = offset;
                            $(this).addClass("agrayright");
                        }
                        btnleft.removeClass("agrayleft");
                    }
                }

                return false;
            });

            if (settings.autoscroll) {
                $.fn.Xslider.sn.autoscroll($(this), settings.autoscroll);
            }
        })
    }

    $.fn.Xslider.sn = {
        defaults: {
            dir: "H",
            speed: 500
        },
        animate: function(obj, w, dir, speed, callback) {
            if (dir == "H") {
                obj.animate({
                    left: w
                }, speed, "easeInSine", callback);
            } else if (dir == "V") {
                obj.animate({
                    top: w
                }, speed, "easeInSine", callback);
            }
        },
        autoscroll: function(obj, time) {
            var vane = "right";

            function autoscrolling() {
                if (vane == "right") {
                    if (!obj.find(".agrayright").length) {
                        obj.find(".aright").trigger("click");
                    } else {
                        vane = "left";
                    }
                }
                if (vane == "left") {
                    if (!obj.find(".agrayleft").length) {
                        obj.find(".aleft").trigger("click");
                    } else {
                        vane = "right";
                    }
                }
            }
            var scrollTimmer = setInterval(autoscrolling, time);
            obj.hover(function() {
                clearInterval(scrollTimmer);
            }, function() {
                scrollTimmer = setInterval(autoscrolling, time);
            });
        }
    }
})(jQuery);


//jqueryzoom
(function($) {
    $.fn.jqueryzoom = function(options) {
        var settings = {
            xzoom: 200,
            //zoomed width default width
            yzoom: 200,
            //zoomed div default width
            offset: 10,
            //zoomed div default offset
            position: "right",
            //zoomed div default position,offset position is to the right of the image
            lens: 1,
            //zooming lens over the image,by default is 1;
            preload: 1
        };
        if (options) {
            $.extend(settings, options);
        }
        var noalt = '';
        $(this).hover(function() {
                var imageLeft = $(this).offset().left;
                var imageTop = $(this).offset().top;
                var imageWidth = $(this).children('img').get(0).offsetWidth;
                var imageHeight = $(this).children('img').get(0).offsetHeight;
                var containerHeight = $(this).height();
                var containerWidth = $(this).width();

                noalt = $(this).children("img").attr("alt");
                var bigimage = $(this).children("img").attr("longdesc");
                if (!bigimage) {
                    return;
                }
                $(this).children("img").attr("alt", '');
                if ($("div.jqueryzoomdiv").get().length == 0) {
                    $(this).after("<div class='jqueryzoomdiv'><img class='bigimg' src='" + bigimage + "'/></div>");
                    $(this).append("<div class='jqueryzoomPup'>&nbsp;</div>");
                }

                if (settings.position == "right") {
                    if (imageLeft + imageWidth + settings.offset + settings.xzoom > screen.width) {
                        leftpos = $(this).offset().left - settings.offset - settings.xzoom;
                    } else {
                        leftpos = $(this).offset().left + imageWidth + settings.offset;
                    }
                } else {
                    leftpos = $(this).offset().left - settings.xzoom - settings.offset;
                    if (leftpos < 0) {
                        leftpos = $(this).offset().left + imageWidth + settings.offset;
                    }
                }

                $("div.jqueryzoomdiv").css({
                    top: $(this).position().top,
                    left: $(this).width() + settings.offset
                });
                $("div.jqueryzoomdiv").width(settings.xzoom);
                $("div.jqueryzoomdiv").height(settings.yzoom);
                $("div.jqueryzoomdiv").show();
                if (!settings.lens) {
                    $(this).css('cursor', 'crosshair');
                }
                $(document.body).mousemove(function(e) {
                    mouse = new MouseEvent(e);
                    /*$("div.jqueryzoomPup").hide();*/
                    var bigwidth = $(".bigimg").get(0).offsetWidth;
                    var bigheight = $(".bigimg").get(0).offsetHeight;
                    var scaley = 'x';
                    var scalex = 'y';
                    if (isNaN(scalex) && isNaN(scaley)) {
                        var scalex = (bigwidth / imageWidth);
                        var scaley = (bigheight / imageHeight);
                        if (scalex == 0 ) {return;}
                        $("div.jqueryzoomPup").width((settings.xzoom) / (scalex * 1));
                        $("div.jqueryzoomPup").height((settings.yzoom) / (scaley * 1));
                        if (settings.lens) {
                            $("div.jqueryzoomPup").css('visibility', 'visible');
                        }
                    }
                    xpos = mouse.x - $("div.jqueryzoomPup").width() / 2 - imageLeft;
                    ypos = mouse.y - $("div.jqueryzoomPup").height() / 2 - imageTop;
                    if (settings.lens) {
                        xpos = (mouse.x - $("div.jqueryzoomPup").width() / 2 < imageLeft) ? 0 : (mouse.x + $("div.jqueryzoomPup").width() / 2 > imageWidth + imageLeft) ? (imageWidth - $("div.jqueryzoomPup").width() - 2) : xpos;
                        ypos = (mouse.y - $("div.jqueryzoomPup").height() / 2 < imageTop) ? 0 : (mouse.y + $("div.jqueryzoomPup").height() / 2 > imageHeight + imageTop) ? (imageHeight - $("div.jqueryzoomPup").height() - 2) : ypos;
                    }
                    if (settings.lens) {
                        var _h = (containerHeight - imageHeight) / 2;
                        var _w = (containerWidth - imageWidth) / 2;

                        $("div.jqueryzoomPup").css({
                            top: ypos + _h,
                            left: xpos + _w
                        });
                    }
                    scrolly = ypos;
                    $("div.jqueryzoomdiv").get(0).scrollTop = scrolly * scaley;
                    scrollx = xpos;
                    $("div.jqueryzoomdiv").get(0).scrollLeft = (scrollx) * scalex;
                });
            },
            function() {
                $(this).children("img").attr("alt", noalt);
                $(document.body).unbind("mousemove");
                if (settings.lens) {
                    $("div.jqueryzoomPup").remove();
                }
                $("div.jqueryzoomdiv").remove();
            });
        count = 0;
        if (settings.preload) {
            $('body').append("<div style='display:none;' class='jqPreload" + count + "'>mymyty</div>");
            $(this).each(function() {
                var imagetopreload = $(this).children("img").attr("longdesc");
                var content = jQuery('div.jqPreload' + count + '').html();
                jQuery('div.jqPreload' + count + '').html(content + '<img src=\"' + imagetopreload + '\">');
            });
        }
        function MouseEvent(e) {
            this.x = e.pageX;
            this.y = e.pageY;
        }

    }
})(jQuery);



//backTotop
;(function($) {
    $.fn.backTotop = function() {
        return this.each(function() {
            var $backToTopEle = $('<div class="sTop" id="backTop"><div class="online"><div class="online01"><a href="javascript:;" class="img" title="在线客服">在线客服</a></div></div><div class="up" style="visibility:hidden;"><a href="javascript:;" class="img" title="返回顶部">返回顶部</a></div></div>')
                .appendTo($(this));
            $('#backTop .up').click(function() {
                $('html, body').animate({
                    scrollTop: 0
                }, 500);
            });
            var backTotopFun = function() {
                var st = $(document).scrollTop(),
                    winh = $(window).height(),
                    posright = (($(window).width() - 960) / 2) - 50;
                // $('.newbackToTop').css('right', posright);
                (st > 200) ? $('#backTop .up').css('visibility', 'visible') : $('#backTop .up').css('visibility', 'hidden');
                //IE6下的定位
                if (!window.XMLHttpRequest) {
                    $('#backTop .up').css('top', st + winh - 250);
                }
            };
            $(window).bind('scroll', backTotopFun);
            $('#backTop .online01').bind('click', function() {
                var _this = $(this);
                if (_this.data('data')) {$('#backTop .online02').show();return;}
                $.get("/online_services?limit=", function(json) {
                    if (json.status == 1) {
                        var showOnlineEle = '<div class="online02 hide">';
                        showOnlineEle += '<div class="title">在线客服<a href="javascript:;" class="service_trigger"></a></div>';
                        showOnlineEle += '<div class="onlineCon">';
                        for(var i=0;i<json.data.length;i++){
                            var title = "";
                            if(json.data[i].title){
                                title = json.data[i].title;
                            }
                            if(i == 0){
                                showOnlineEle += '  <p>'+title+'</p>';
                                showOnlineEle += '   <ul class="mbody">';
                                if(json.data[i].sType =='0'){
                                    showOnlineEle += '       <li>';
                                    showOnlineEle += '           <a target="_blank" class="qq"  href="http://wpa.qq.com/msgrd?v=3&amp;uin='+json.data[i].sNumber+'&amp;site=qq&amp;menu=yes">';
                                    showOnlineEle += '           '+json.data[i].sName+'</a>';
                                    showOnlineEle += '       </li>';
                                }else if(json.data[i].sType =='1'){
                                    showOnlineEle += '   <span>咨询热线<br />025-68586888-123</span>';
                                }else if(json.data[i].sType =='2'){
                                    showOnlineEle += '       <li>';
                                    showOnlineEle += '           <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid='+json.data[i].sNumber+'&site=cntaobao&s=1&charset=utf-8">';
                                    showOnlineEle += '           '+json.data[i].sName+'</a>';
                                    showOnlineEle += '       </li>';
                                }
                            }else{
                                if(json.data[i].sType =='0'){
                                    showOnlineEle += '       <li>';
                                    showOnlineEle += '           <a target="_blank" class="qq"  href="http://wpa.qq.com/msgrd?v=3&amp;uin='+json.data[i].sNumber+'&amp;site=qq&amp;menu=yes">';
                                    showOnlineEle += '           '+json.data[i].sName+'</a>';
                                    showOnlineEle += '       </li>';
                                }else if(json.data[i].sType =='1'){
                                    showOnlineEle += '<span class="orange">'+json.data[i].sNumber+'</span><span>'+json.data[i].sName+'</span>';
                                }else if(json.data[i].sType =='2'){
                                    showOnlineEle += '       <li>';
                                    showOnlineEle += '           <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid='+json.data[i].sNumber+'&site=cntaobao&s=1&charset=utf-8">';
                                    showOnlineEle += '           '+json.data[i].sName+'</a>';
                                    showOnlineEle += '       </li>';
                                }
                            }
                        }
                        showOnlineEle += '   </ul>';
                        showOnlineEle += '</div>';
                        showOnlineEle += '</div>';
                        _this.data('data', true).after(showOnlineEle);
                        $('#backTop .online02').show();
                    }
                });
            });
            $('#backTop').delegate('.service_trigger', 'click', function() {
                $('#backTop .online02').hide();
            });
            backTotopFun();
        });
    }
})(jQuery);

/**
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value.
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

;(function (factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as anonymous module.
        define(['jquery'], factory);
    } else {
        // Browser globals.
        factory(jQuery);
    }
}(function ($) {

    var pluses = /\+/g;

    function raw(s) {
        return s;
    }

    function decoded(s) {
        return decodeURIComponent(s.replace(pluses, ' '));
    }

    function converted(s) {
        if (s.indexOf('"') === 0) {
            // This is a quoted cookie as according to RFC2068, unescape
            s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
        }
        try {
            return config.json ? JSON.parse(s) : s;
        } catch(er) {}
    }

    var config = $.cookie = function (key, value, options) {

        // write
        if (value !== undefined) {
            options = $.extend({}, config.defaults, options);

            if (typeof options.expires === 'number') {
                var days = options.expires, t = options.expires = new Date();
                t.setDate(t.getDate() + days);
            }

            value = config.json ? JSON.stringify(value) : String(value);

            return (document.cookie = [
                config.raw ? key : encodeURIComponent(key),
                '=',
                config.raw ? value : encodeURIComponent(value),
                options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
                options.path    ? '; path=' + options.path : '',
                options.domain  ? '; domain=' + options.domain : '',
                options.secure  ? '; secure' : ''
            ].join(''));
        }

        // read
        var decode = config.raw ? raw : decoded;
        var cookies = document.cookie.split('; ');
        var result = key ? undefined : {};
        for (var i = 0, l = cookies.length; i < l; i++) {
            var parts = cookies[i].split('=');
            var name = decode(parts.shift());
            var cookie = decode(parts.join('='));

            if (key && key === name) {
                result = converted(cookie);
                break;
            }

            if (!key) {
                result[name] = converted(cookie);
            }
        }

        return result;
    };

    config.defaults = {};

    $.removeCookie = function (key, options) {
        if ($.cookie(key) !== undefined) {
            // Must not alter options, thus extending a fresh object...
            $.cookie(key, '', $.extend({}, options, { expires: -1 }));
            return true;
        }
        return false;
    };

}));

//fixed tools
(function($) {
    $.fn.navFixed = function(options) {
        var settings = {
            position: 'top',
            width: '969px'
        }

        if (options) {
            $.extend(settings, options);
        }
        return this.each(function() {
            var _this = $(this),
                toolsTop = _this.offset().top;
            if (jQuery.browser.msie && jQuery.browser.version == "6.0") {
                return;
            }

            var _navTop = function() {
                if ($(window).scrollTop() >= toolsTop) {
                    _this.css({
                        position: 'fixed',
                        width: settings.width,
                        top: '0'
                    });
                } else {
                    _this.css({
                        position: 'static',
                        top: '0'
                    });
                }
            }

            var _navBottom = function() {
                if (toolsTop >= $(window).scrollTop() && toolsTop > ($(window).scrollTop() + $(window).height())) {
                    _this.css({
                        position: 'fixed',
                        bottom: '0'
                    });
                } else {
                    _this.css({
                        position: 'static',
                        bottom: '0'
                    });
                }
            }
            $(window).scroll(function() {
                settings.position == 'top' ? _navTop() : _navBottom();
            });
        });
    }
})(jQuery);

/*!
 * artDialog 4.1.7
 * Date: 2013-03-03 08:04
 * http://code.google.com/p/artdialog/
 * (c) 2009-2012 TangBin, http://www.planeArt.cn
 *
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://creativecommons.org/licenses/LGPL/2.1/
 */
(function(e,t,n){e.noop=e.noop||function(){};var r,i,s,o,u=0,a=e(t),f=e(document),l=e("html"),c=document.documentElement,h=t.VBArray&&!t.XMLHttpRequest,p="createTouch"in document&&!("onmousemove"in c)||/(iPhone|iPad|iPod)/i.test(navigator.userAgent),d="artDialog"+ +(new Date),v=function(t,i,s){t=t||{};if(typeof t=="string"||t.nodeType===1)t={content:t,fixed:!p};var o,a=v.defaults,f=t.follow=this.nodeType===1&&this||t.follow;for(var l in a)t[l]===n&&(t[l]=a[l]);return e.each({ok:"yesFn",cancel:"noFn",close:"closeFn",init:"initFn",okVal:"yesText",cancelVal:"noText"},function(e,r){t[e]=t[e]!==n?t[e]:t[r]}),typeof f=="string"&&(f=e(f)[0]),t.id=f&&f[d+"follow"]||t.id||d+u,o=v.list[t.id],f&&o?o.follow(f).zIndex().focus():o?o.zIndex().focus():(p&&(t.fixed=!1),e.isArray(t.button)||(t.button=t.button?[t.button]:[]),i!==n&&(t.ok=i),s!==n&&(t.cancel=s),t.ok&&t.button.push({name:t.okVal,callback:t.ok,focus:!0}),t.cancel&&t.button.push({name:t.cancelVal,callback:t.cancel}),v.defaults.zIndex=t.zIndex,u++,v.list[t.id]=r?r._init(t):new v.fn._init(t))};v.fn=v.prototype={version:"4.1.7",closed:!0,_init:function(e){var n=this,i,s=e.icon,o=s&&(h?{png:"icons/"+s+".png"}:{backgroundImage:"url('"+e.path+"/skins/icons/"+s+".png')"});return n.closed=!1,n.config=e,n.DOM=i=n.DOM||n._getDOM(),i.wrap.addClass(e.skin),i.close[e.cancel===!1?"hide":"show"](),i.icon[0].style.display=s?"":"none",i.iconBg.css(o||{background:"none"}),i.se.css("cursor",e.resize?"se-resize":"auto"),i.title.css("cursor",e.drag?"move":"auto"),i.content.css("padding",e.padding),n[e.show?"show":"hide"](!0),n.button(e.button).title(e.title).content(e.content,!0).size(e.width,e.height).time(e.time),e.follow?n.follow(e.follow):n.position(e.left,e.top),n.zIndex().focus(),e.lock&&n.lock(),n._addEvent(),n._ie6PngFix(),r=null,e.init&&e.init.call(n,t),n},content:function(e){var t,r,i,s,o=this,u=o.DOM,a=u.wrap[0],f=a.offsetWidth,l=a.offsetHeight,c=parseInt(a.style.left),h=parseInt(a.style.top),p=a.style.width,d=u.content,v=d[0];return o._elemBack&&o._elemBack(),a.style.width="auto",e===n?v:(typeof e=="string"?d.html(e):e&&e.nodeType===1&&(s=e.style.display,t=e.previousSibling,r=e.nextSibling,i=e.parentNode,o._elemBack=function(){t&&t.parentNode?t.parentNode.insertBefore(e,t.nextSibling):r&&r.parentNode?r.parentNode.insertBefore(e,r):i&&i.appendChild(e),e.style.display=s,o._elemBack=null},d.html(""),v.appendChild(e),e.style.display="block"),arguments[1]||(o.config.follow?o.follow(o.config.follow):(f=a.offsetWidth-f,l=a.offsetHeight-l,c-=f/2,h-=l/2,a.style.left=Math.max(c,0)+"px",a.style.top=Math.max(h,0)+"px"),p&&p!=="auto"&&(a.style.width=a.offsetWidth+"px"),o._autoPositionType()),o._ie6SelectFix(),o._runScript(v),o)},title:function(e){var t=this.DOM,r=t.wrap,i=t.title,s="aui_state_noTitle";return e===n?i[0]:(e===!1?(i.hide().html(""),r.addClass(s)):(i.show().html(e||""),r.removeClass(s)),this)},position:function(e,t){var r=this,i=r.config,s=r.DOM.wrap[0],o=h?!1:i.fixed,u=h&&r.config.fixed,l=f.scrollLeft(),c=f.scrollTop(),p=o?0:l,d=o?0:c,v=a.width(),m=a.height(),g=s.offsetWidth,y=s.offsetHeight,b=s.style;if(e||e===0)r._left=e.toString().indexOf("%")!==-1?e:null,e=r._toNumber(e,v-g),typeof e=="number"?(e=u?e+=l:e+p,b.left=Math.max(e,p)+"px"):typeof e=="string"&&(b.left=e);if(t||t===0)r._top=t.toString().indexOf("%")!==-1?t:null,t=r._toNumber(t,m-y),typeof t=="number"?(t=u?t+=c:t+d,b.top=Math.max(t,d)+"px"):typeof t=="string"&&(b.top=t);return e!==n&&t!==n&&(r._follow=null,r._autoPositionType()),r},size:function(e,t){var n,r,i,s,o=this,u=o.config,f=o.DOM,l=f.wrap,c=f.main,h=l[0].style,p=c[0].style;return e&&(o._width=e.toString().indexOf("%")!==-1?e:null,n=a.width()-l[0].offsetWidth+c[0].offsetWidth,i=o._toNumber(e,n),e=i,typeof e=="number"?(h.width="auto",p.width=Math.max(o.config.minWidth,e)+"px",h.width=l[0].offsetWidth+"px"):typeof e=="string"&&(p.width=e,e==="auto"&&l.css("width","auto"))),t&&(o._height=t.toString().indexOf("%")!==-1?t:null,r=a.height()-l[0].offsetHeight+c[0].offsetHeight,s=o._toNumber(t,r),t=s,typeof t=="number"?p.height=Math.max(o.config.minHeight,t)+"px":typeof t=="string"&&(p.height=t)),o._ie6SelectFix(),o},follow:function(t){var n,r=this,i=r.config;if(typeof t=="string"||t&&t.nodeType===1)n=e(t),t=n[0];if(!t||!t.offsetWidth&&!t.offsetHeight)return r.position(r._left,r._top);var s=d+"follow",o=a.width(),u=a.height(),l=f.scrollLeft(),c=f.scrollTop(),p=n.offset(),v=t.offsetWidth,m=t.offsetHeight,g=h?!1:i.fixed,y=g?p.left-l:p.left,b=g?p.top-c:p.top,w=r.DOM.wrap[0],E=w.style,S=w.offsetWidth,x=w.offsetHeight,T=y-(S-v)/2,N=b+m,C=g?0:l,k=g?0:c;return T=T<C?y:T+S>o&&y-S>C?y-S+v:T,N=N+x>u+k&&b-x>k?b-x:N,E.left=T+"px",E.top=N+"px",r._follow&&r._follow.removeAttribute(s),r._follow=t,t[s]=i.id,r._autoPositionType(),r},button:function(){var t=this,r=arguments,i=t.DOM,s=i.buttons,o=s[0],u="aui_state_highlight",a=t._listeners=t._listeners||{},f=e.isArray(r[0])?r[0]:[].slice.call(r);return r[0]===n?o:(e.each(f,function(n,r){var i=r.name,s=!a[i],f=s?document.createElement("button"):a[i].elem;a[i]||(a[i]={}),r.callback&&(a[i].callback=r.callback),r.className&&(f.className=r.className),r.focus&&(t._focus&&t._focus.removeClass(u),t._focus=e(f).addClass(u),t.focus()),f.setAttribute("type","button"),f[d+"callback"]=i,f.disabled=!!r.disabled,s&&(f.innerHTML=i,a[i].elem=f,o.appendChild(f))}),s[0].style.display=f.length?"":"none",t._ie6SelectFix(),t)},show:function(){return this.DOM.wrap.show(),!arguments[0]&&this._lockMaskWrap&&this._lockMaskWrap.show(),this},hide:function(){return this.DOM.wrap.hide(),!arguments[0]&&this._lockMaskWrap&&this._lockMaskWrap.hide(),this},close:function(){if(this.closed)return this;var e=this,n=e.DOM,i=n.wrap,s=v.list,o=e.config.close,u=e.config.follow;e.time();if(typeof o=="function"&&o.call(e,t)===!1)return e;e.unlock(),e._elemBack&&e._elemBack(),i[0].className=i[0].style.cssText="",n.title.html(""),n.content.html(""),n.buttons.html(""),v.focus===e&&(v.focus=null),u&&u.removeAttribute(d+"follow"),delete s[e.config.id],e._removeEvent(),e.hide(!0)._setAbsolute();for(var a in e)e.hasOwnProperty(a)&&a!=="DOM"&&delete e[a];return r?i.remove():r=e,e},time:function(e){var t=this,n=t.config.cancelVal,r=t._timer;return r&&clearTimeout(r),e&&(t._timer=setTimeout(function(){t._click(n)},1e3*e)),t},focus:function(){try{if(this.config.focus){var e=this._focus&&this._focus[0]||this.DOM.close[0];e&&e.focus()}}catch(t){}return this},zIndex:function(){var e=this,t=e.DOM,n=t.wrap,r=v.focus,i=v.defaults.zIndex++;return n.css("zIndex",i),e._lockMask&&e._lockMask.css("zIndex",i-1),r&&r.DOM.wrap.removeClass("aui_state_focus"),v.focus=e,n.addClass("aui_state_focus"),e},lock:function(){if(this._lock)return this;var t=this,n=v.defaults.zIndex-1,r=t.DOM.wrap,i=t.config,s=f.width(),o=f.height(),u=t._lockMaskWrap||e(document.body.appendChild(document.createElement("div"))),a=t._lockMask||e(u[0].appendChild(document.createElement("div"))),l="(document).documentElement",c=p?"width:"+s+"px;height:"+o+"px":"width:100%;height:100%",d=h?"position:absolute;left:expression("+l+".scrollLeft);top:expression("+l+".scrollTop);width:expression("+l+".clientWidth);height:expression("+l+".clientHeight)":"";return t.zIndex(),r.addClass("aui_state_lock"),u[0].style.cssText=c+";position:fixed;z-index:"+n+";top:0;left:0;overflow:hidden;"+d,a[0].style.cssText="height:100%;background:"+i.background+";filter:alpha(opacity=0);opacity:0",h&&a.html('<iframe src="about:blank" style="width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity=0)"></iframe>'),a.stop(),a.bind("click",function(){t._reset()}).bind("dblclick",function(){t._click(t.config.cancelVal)}),i.duration===0?a.css({opacity:i.opacity}):a.animate({opacity:i.opacity},i.duration),t._lockMaskWrap=u,t._lockMask=a,t._lock=!0,t},unlock:function(){var e=this,t=e._lockMaskWrap,n=e._lockMask;if(!e._lock)return e;var i=t[0].style,s=function(){h&&(i.removeExpression("width"),i.removeExpression("height"),i.removeExpression("left"),i.removeExpression("top")),i.cssText="display:none",r&&t.remove()};return n.stop().unbind(),e.DOM.wrap.removeClass("aui_state_lock"),e.config.duration?n.animate({opacity:0},e.config.duration,s):s(),e._lock=!1,e},_getDOM:function(){var t=document.createElement("div"),n=document.body;t.style.cssText="position:absolute;left:0;top:0",t.innerHTML=v._templates,n.insertBefore(t,n.firstChild);var r,i=0,s={wrap:e(t)},o=t.getElementsByTagName("*"),u=o.length;for(;i<u;i++)r=o[i].className.split("aui_")[1],r&&(s[r]=e(o[i]));return s},_toNumber:function(e,t){if(!e&&e!==0||typeof e=="number")return e;var n=e.length-1;return e.lastIndexOf("px")===n?e=parseInt(e):e.lastIndexOf("%")===n&&(e=parseInt(t*e.split("%")[0]/100)),e},_ie6PngFix:h?function(){var e=0,t,n,r,i,s=v.defaults.path+"/skins/",o=this.DOM.wrap[0].getElementsByTagName("*");for(;e<o.length;e++)t=o[e],n=t.currentStyle.png,n&&(r=s+n,i=t.runtimeStyle,i.backgroundImage="none",i.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+r+"',sizingMethod='crop')")}:e.noop,_ie6SelectFix:h?function(){var e=this.DOM.wrap,t=e[0],n=d+"iframeMask",r=e[n],i=t.offsetWidth,s=t.offsetHeight;i+="px",s+="px",r?(r.style.width=i,r.style.height=s):(r=t.appendChild(document.createElement("iframe")),e[n]=r,r.src="about:blank",r.style.cssText="position:absolute;z-index:-1;left:0;top:0;filter:alpha(opacity=0);width:"+i+";height:"+s)}:e.noop,_runScript:function(e){var t,n=0,r=0,i=e.getElementsByTagName("script"),s=i.length,o=[];for(;n<s;n++)i[n].type==="text/dialog"&&(o[r]=i[n].innerHTML,r++);o.length&&(o=o.join(""),t=new Function(o),t.call(this))},_autoPositionType:function(){this[this.config.fixed?"_setFixed":"_setAbsolute"]()},_setFixed:function(){return h&&e(function(){var t="backgroundAttachment";l.css(t)!=="fixed"&&e("body").css(t)!=="fixed"&&l.css({zoom:1,backgroundImage:"url(about:blank)",backgroundAttachment:"fixed"})}),function(){var e=this.DOM.wrap,t=e[0].style;if(h){var n=parseInt(e.css("left")),r=parseInt(e.css("top")),i=f.scrollLeft(),s=f.scrollTop(),o="(document.documentElement)";this._setAbsolute(),t.setExpression("left","eval("+o+".scrollLeft + "+(n-i)+') + "px"'),t.setExpression("top","eval("+o+".scrollTop + "+(r-s)+') + "px"')}else t.position="fixed"}}(),_setAbsolute:function(){var e=this.DOM.wrap[0].style;h&&(e.removeExpression("left"),e.removeExpression("top")),e.position="absolute"},_click:function(e){var n=this,r=n._listeners[e]&&n._listeners[e].callback;return typeof r!="function"||r.call(n,t)!==!1?n.close():n},_reset:function(e){var t,n=this,r=n._winSize||a.width()*a.height(),i=n._follow,s=n._width,o=n._height,u=n._left,f=n._top;if(e){t=n._winSize=a.width()*a.height();if(r===t)return}(s||o)&&n.size(s,o),i?n.follow(i):(u||f)&&n.position(u,f)},_addEvent:function(){var e,n=this,r=n.config,i="CollectGarbage"in t,s=n.DOM;n._winResize=function(){e&&clearTimeout(e),e=setTimeout(function(){n._reset(i)},40)},a.bind("resize",n._winResize),s.wrap.bind("click",function(e){var t=e.target,i;if(t.disabled)return!1;if(t===s.close[0])return n._click(r.cancelVal),!1;i=t[d+"callback"],i&&n._click(i),n._ie6SelectFix()}).bind("mousedown",function(){n.zIndex()})},_removeEvent:function(){var e=this,t=e.DOM;t.wrap.unbind(),a.unbind("resize",e._winResize)}},v.fn._init.prototype=v.fn,e.fn.dialog=e.fn.artDialog=function(){var e=arguments;return this[this.live?"live":"bind"]("click",function(){return v.apply(this,e),!1}),this},v.focus=null,v.get=function(e){return e===n?v.list:v.list[e]},v.list={},f.bind("keydown",function(e){var t=e.target,n=t.nodeName,r=/^INPUT|TEXTAREA$/,i=v.focus,s=e.keyCode;if(!i||!i.config.esc||r.test(n))return;s===27&&i._click(i.config.cancelVal)}),o=t._artDialog_path||function(e,t,n){for(t in e)e[t].src&&e[t].src.indexOf("artDialog")!==-1&&(n=e[t]);return i=n||e[e.length-1],n=i.src.replace(/\\/g,"/"),n.lastIndexOf("/")<0?".":n.substring(0,n.lastIndexOf("/"))}(document.getElementsByTagName("script")),s=i.src.split("skin=")[1];if(s){var m=document.createElement("link");m.rel="stylesheet",m.href=o+"/skins/"+s+".css?"+v.fn.version,i.parentNode.insertBefore(m,i)}a.bind("load",function(){setTimeout(function(){if(u)return;v({left:"-9999em",time:9,fixed:!1,lock:!1,focus:!1})},150)});try{document.execCommand("BackgroundImageCache",!1,!0)}catch(g){}v._templates='<div class="aui_outer"><table class="aui_border"><tbody><tr><td class="aui_nw"></td><td class="aui_n"></td><td class="aui_ne"></td></tr><tr><td class="aui_w"></td><td class="aui_c"><div class="aui_inner"><table class="aui_dialog"><tbody><tr><td colspan="2" class="aui_header"><div class="aui_titleBar"><div class="aui_title"></div><a class="aui_close" href="javascript:/*artDialog*/;">\u00d7</a></div></td></tr><tr><td class="aui_icon"><div class="aui_iconBg"></div></td><td class="aui_main"><div class="aui_content"></div></td></tr><tr><td colspan="2" class="aui_footer"><div class="aui_buttons"></div></td></tr></tbody></table></div></td><td class="aui_e"></td></tr><tr><td class="aui_sw"></td><td class="aui_s"></td><td class="aui_se"></td></tr></tbody></table></div>',v.defaults={content:'<div class="aui_loading"><span>loading..</span></div>',title:"\u6d88\u606f",button:null,ok:null,cancel:null,init:null,close:null,okVal:"\u786e\u5b9a",cancelVal:"\u53d6\u6d88",width:"auto",height:"auto",minWidth:96,minHeight:32,padding:"20px 25px",skin:"",icon:null,time:null,esc:!0,focus:!0,show:!0,follow:null,path:o,lock:!1,background:"#000",opacity:.7,duration:300,fixed:!1,left:"50%",top:"38.2%",zIndex:1987,resize:!0,drag:!0},t.artDialog=e.dialog=e.artDialog=v})(this.art||this.jQuery&&(this.art=jQuery),this),function(e){var t,n,r=e(window),i=e(document),s=document.documentElement,o=!("minWidth"in s.style),u="onlosecapture"in s,a="setCapture"in s;artDialog.dragEvent=function(){var e=this,t=function(t){var n=e[t];e[t]=function(){return n.apply(e,arguments)}};t("start"),t("move"),t("end")},artDialog.dragEvent.prototype={onstart:e.noop,start:function(e){return i.bind("mousemove",this.move).bind("mouseup",this.end),this._sClientX=e.clientX,this._sClientY=e.clientY,this.onstart(e.clientX,e.clientY),!1},onmove:e.noop,move:function(e){return this._mClientX=e.clientX,this._mClientY=e.clientY,this.onmove(e.clientX-this._sClientX,e.clientY-this._sClientY),!1},onend:e.noop,end:function(e){return i.unbind("mousemove",this.move).unbind("mouseup",this.end),this.onend(e.clientX,e.clientY),!1}},n=function(e){var n,s,f,l,c,h,p=artDialog.focus,d=p.DOM,v=d.wrap,m=d.title,g=d.main,y="getSelection"in window?function(){window.getSelection().removeAllRanges()}:function(){try{document.selection.empty()}catch(e){}};t.onstart=function(e,n){h?(s=g[0].offsetWidth,f=g[0].offsetHeight):(l=v[0].offsetLeft,c=v[0].offsetTop),i.bind("dblclick",t.end),!o&&u?m.bind("losecapture",t.end):r.bind("blur",t.end),a&&m[0].setCapture(),v.addClass("aui_state_drag"),p.focus()},t.onmove=function(e,t){if(h){var r=v[0].style,i=g[0].style,o=e+s,u=t+f;r.width="auto",i.width=Math.max(0,o)+"px",r.width=v[0].offsetWidth+"px",i.height=Math.max(0,u)+"px"}else{var i=v[0].style,a=Math.max(n.minX,Math.min(n.maxX,e+l)),d=Math.max(n.minY,Math.min(n.maxY,t+c));i.left=a+"px",i.top=d+"px"}y(),p._ie6SelectFix()},t.onend=function(e,n){i.unbind("dblclick",t.end),!o&&u?m.unbind("losecapture",t.end):r.unbind("blur",t.end),a&&m[0].releaseCapture(),o&&!p.closed&&p._autoPositionType(),v.removeClass("aui_state_drag")},h=e.target===d.se[0]?!0:!1,n=function(){var e,t,n=p.DOM.wrap[0],s=n.style.position==="fixed",o=n.offsetWidth,u=n.offsetHeight,a=r.width(),f=r.height(),l=s?0:i.scrollLeft(),c=s?0:i.scrollTop(),e=a-o+l;return t=f-u+c,{minX:l,minY:c,maxX:e,maxY:t}}(),t.start(e)},i.bind("mousedown",function(e){var r=artDialog.focus;if(!r)return;var i=e.target,s=r.config,o=r.DOM;if(s.drag!==!1&&i===o.title[0]||s.resize!==!1&&i===o.se[0])return t=t||new artDialog.dragEvent,n(e),!1})}(this.art||this.jQuery&&(this.art=jQuery));
/*!
 * artDialog iframeTools
 * Date: 2011-12-08 1:32
 * http://code.google.com/p/artdialog/
 * (c) 2009-2011 TangBin, http://www.planeArt.cn
 *
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://creativecommons.org/licenses/LGPL/2.1/
 */
eval(function(B,D,A,G,E,F){function C(A){return A<62?String.fromCharCode(A+=A<26?65:A<52?71:-4):A<63?'_':A<64?'$':C(A>>6)+C(A&63)}while(A>0)E[C(G--)]=D[--A];return B.replace(/[\w\$]+/g,function(A){return E[A]==F[A]?A:E[A]})}('(6(E,C,D,A){c B,X,W,J="@_.DATA",K="@_.OPEN",H="@_.OPENER",I=C.k=C.k||"@_.WINNAME"+(Bd Bo).Be(),F=C.VBArray&&!C.XMLHttpRequest;E(6(){!C.Bu&&7.BY==="B0"&&Br("9 Error: 7.BY === \\"B0\\"")});c G=D.d=6(){c W=C,X=6(A){f{c W=C[A].7;W.BE}u(X){v!V}v C[A].9&&W.BE("frameset").length===U};v X("d")?W=C.d:X("BB")&&(W=C.BB),W}();D.BB=G,B=G.9,W=6(){v B.BW.w},D.m=6(C,B){c W=D.d,X=W[J]||{};W[J]=X;b(B!==A)X[C]=B;else v X[C];v X},D.BQ=6(W){c X=D.d[J];X&&X[W]&&1 X[W]},D.through=X=6(){c X=B.BR(i,BJ);v G!==C&&(D.B4[X.0.Z]=X),X},G!==C&&E(C).BN("unload",6(){c A=D.B4,W;BO(c X BS A)A[X]&&(W=A[X].0,W&&(W.duration=U),A[X].s(),1 A[X])}),D.p=6(B,O,BZ){O=O||{};c N,L,M,Bc,T,S,R,Q,BF,P=D.d,Ba="8:BD;n:-Bb;d:-Bb;Bp:o U;Bf:transparent",BI="r:g%;x:g%;Bp:o U";b(BZ===!V){c BH=(Bd Bo).Be(),BG=B.replace(/([?&])W=[^&]*/,"$1_="+BH);B=BG+(BG===B?(/\\?/.test(B)?"&":"?")+"W="+BH:"")}c G=6(){c B,C,W=L.2.B2(".aui_loading"),A=N.0;M.addClass("Bi"),W&&W.hide();f{Q=T.$,R=E(Q.7),BF=Q.7.Bg}u(X){T.q.5=BI,A.z?N.z(A.z):N.8(A.n,A.d),O.j&&O.j.l(N,Q,P),O.j=By;v}B=A.r==="Bt"?R.r()+(F?U:parseInt(E(BF).Bv("marginLeft"))):A.r,C=A.x==="Bt"?R.x():A.x,setTimeout(6(){T.q.5=BI},U),N.Bk(B,C),A.z?N.z(A.z):N.8(A.n,A.d),O.j&&O.j.l(N,Q,P),O.j=By},I={w:W(),j:6(){N=i,L=N.h,Bc=L.BM,M=L.2,T=N.BK=P.7.Bn("BK"),T.Bx=B,T.k="Open"+N.0.Z,T.q.5=Ba,T.BX("frameborder",U,U),T.BX("allowTransparency",!U),S=E(T),N.2().B3(T),Q=T.$;f{Q.k=T.k,D.m(T.k+K,N),D.m(T.k+H,C)}u(X){}S.BN("BC",G)},s:6(){S.Bv("4","o").unbind("BC",G);b(O.s&&O.s.l(i,T.$,P)===!V)v!V;M.removeClass("Bi"),S[U].Bx="about:blank",S.remove();f{D.BQ(T.k+K),D.BQ(T.k+H)}u(X){}}};Bq O.Y=="6"&&(I.Y=6(){v O.Y.l(N,T.$,P)}),Bq O.y=="6"&&(I.y=6(){v O.y.l(N,T.$,P)}),1 O.2;BO(c J BS O)I[J]===A&&(I[J]=O[J]);v X(I)},D.p.Bw=D.m(I+K),D.BT=D.m(I+H)||C,D.p.origin=D.BT,D.s=6(){c X=D.m(I+K);v X&&X.s(),!V},G!=C&&E(7).BN("mousedown",6(){c X=D.p.Bw;X&&X.w()}),D.BC=6(C,D,B){B=B||!V;c G=D||{},H={w:W(),j:6(A){c W=i,X=W.0;E.ajax({url:C,success:6(X){W.2(X),G.j&&G.j.l(W,A)},cache:B})}};1 D.2;BO(c F BS G)H[F]===A&&(H[F]=G[F]);v X(H)},D.Br=6(B,A){v X({Z:"Alert",w:W(),BL:"warning",t:!U,BA:!U,2:B,Y:!U,s:A})},D.confirm=6(C,A,B){v X({Z:"Confirm",w:W(),BL:"Bm",t:!U,BA:!U,3:U.V,2:C,Y:6(X){v A.l(i,X)},y:6(X){v B&&B.l(i,X)}})},D.prompt=6(D,B,C){C=C||"";c A;v X({Z:"Prompt",w:W(),BL:"Bm",t:!U,BA:!U,3:U.V,2:["<e q=\\"margin-bottom:5px;font-Bk:12px\\">",D,"</e>","<e>","<Bl B1=\\"",C,"\\" q=\\"r:18em;Bh:6px 4px\\" />","</e>"].join(""),j:6(){A=i.h.2.B2("Bl")[U],A.select(),A.BP()},Y:6(X){v B&&B.l(i,A.B1,X)},y:!U})},D.tips=6(B,A){v X({Z:"Tips",w:W(),title:!V,y:!V,t:!U,BA:!V}).2("<e q=\\"Bh: U 1em;\\">"+B+"</e>").time(A||V.B6)},E(6(){c A=D.dragEvent;b(!A)v;c B=E(C),X=E(7),W=F?"BD":"t",H=A.prototype,I=7.Bn("e"),G=I.q;G.5="4:o;8:"+W+";n:U;d:U;r:g%;x:g%;"+"cursor:move;filter:alpha(3=U);3:U;Bf:#FFF",7.Bg.B3(I),H.Bj=H.Bs,H.BV=H.Bz,H.Bs=6(){c E=D.BP.h,C=E.BM[U],A=E.2[U].BE("BK")[U];H.Bj.BR(i,BJ),G.4="block",G.w=D.BW.w+B5,W==="BD"&&(G.r=B.r()+"a",G.x=B.x()+"a",G.n=X.scrollLeft()+"a",G.d=X.scrollTop()+"a"),A&&C.offsetWidth*C.offsetHeight>307200&&(C.q.BU="hidden")},H.Bz=6(){c X=D.BP;H.BV.BR(i,BJ),G.4="o",X&&(X.h.BM[U].q.BU="visible")}})})(i.art||i.Bu,i,i.9)','P|R|T|U|V|W|0|1|_|$|ok|id|px|if|var|top|div|try|100|DOM|this|init|name|call|data|left|none|open|style|width|close|fixed|catch|return|zIndex|height|cancel|follow|config|delete|content|opacity|display|cssText|function|document|position|artDialog|ARTDIALOG|contentWindow|lock|parent|load|absolute|getElementsByTagName|S|Y|Z|a|arguments|iframe|icon|main|bind|for|focus|removeData|apply|in|opener|visibility|_end|defaults|setAttribute|compatMode|O|Q|9999em|X|new|getTime|background|body|padding|aui_state_full|_start|size|input|question|createElement|Date|border|typeof|alert|start|auto|jQuery|css|pc|src|null|end|BackCompat|value|find|appendChild|list|3|5'.split('|'),109,122,{},{}));

/**
 * 将javascript数据类型转换为json字符串的方法。
 *
 * @public
 * @param {object} 需转换为json字符串的对象, 一般为Json 【支持object,array,string,function,number,boolean,regexp *】
 * @return 返回json字符串
 **/
jQuery.extend({
    toJSONString: function(object) {
        var type = typeof object;
        if ('object' == type) {
            if (Array == object.constructor) type = 'array';
            else if (RegExp == object.constructor) type = 'regexp';
            else type = 'object';
        }
        switch (type) {
            case 'undefined':
            case 'unknown':
                return;
                break;
            case 'function':
            case 'boolean':
            case 'regexp':
                return object.toString();
                break;
            case 'number':
                return isFinite(object) ? object.toString() : 'null';
                break;
            case 'string':
                return '"' + object.replace(/(\\|\")/g, "\\$1").replace(/\n|\r|\t/g, function() {
                    var a = arguments[0];
                    return (a == '\n') ? '\\n' : (a == '\r') ? '\\r' : (a == '\t') ? '\\t' : ""
                }) + '"';
                break;
            case 'object':
                if (object === null) return 'null';
                var results = [];
                for (var property in object) {
                    var value = jQuery.toJSONString(object[property]);
                    if (value !== undefined) results.push(jQuery.toJSONString(property) + ':' + value);
                }
                return '{' + results.join(',') + '}';
                break;
            case 'array':
                var results = [];
                for (var i = 0; i < object.length; i++) {
                    var value = jQuery.toJSONString(object[i]);
                    if (value !== undefined) results.push(value);
                }
                return '[' + results.join(',') + ']';
                break;
        }
    }
});


/*
hoverDuring       鼠标经过的延时时间
outDuring          鼠标移出的延时时间
hoverEvent        鼠标经过执行的方法
outEvent         鼠标移出执行的方法
 */
(function($){
    $.fn.hoverDelay = function(options) {
        var defaults = {
            hoverDuring: 200,
            outDuring: 200,
            hoverEvent: function(){
                $.noop();
            },
            outEvent: function(){
                $.noop();
            }
        };
        var sets = $.extend(defaults,options || {});
        var hoverTimer, outTimer;
        return $(this).each(function() {
            var _self = $(this);
            $(this).hover(function() {
                clearTimeout(outTimer);
                hoverTimer = setTimeout(function() {sets.hoverEvent.apply(_self)}, sets.hoverDuring);
            },function() {
                clearTimeout(hoverTimer);
                outTimer = setTimeout(function() {sets.outEvent.apply(_self)}, sets.outDuring);
            });
        });
    }
})(jQuery);